package com.demo.service.impl;

import com.demo.entity.Orders;
import com.demo.mapper.OrdersMapper;
import com.demo.service.OrdersService;

import java.util.List;

public class OrdersServiceImpl implements OrdersService{
	//service������dao(mapper)
	private OrdersMapper ordersMapper;
	public void setOrdersMapper(OrdersMapper ordersMapper) {
		this.ordersMapper = ordersMapper;
	}

	@Override
	public List<Orders> queryOrdersInfo() {
		return ordersMapper.queryOrdersInfo();
	}

	@Override
	public void updateOrdersByState(String pid) {
		ordersMapper.updateOrdersByState(pid);
	}

	@Override
	public void insertOrderInfo(Double money, String receiverName, String receiverPhone, String receiverAddress,
			int paystate, String uname) {
		ordersMapper.insertOrderInfo(money, receiverName, receiverPhone, receiverAddress, paystate, uname);
	}

	@Override
	public void updateProductsInfo(int pnum, String pid, int pnum2) {
		ordersMapper.updateProductsInfo(pnum, pid, pnum2);
	}

	@Override
	public void deleteUnPayOrdersById(String id) {
		ordersMapper.deleteUnPayOrdersById(id);
	}

	@Override
	public int selectProductPnum(String pid) {
		return ordersMapper.selectProductPnum(pid);
	}



	
}
